Remove gtk_icon_paintable_download_texture() public API
authorAlexander Larsson <alexl@redhat.com>
Thu, 6 Feb 2020 16:14:44 +0000 (17:14 +0100)
committerAlexander Larsson <alexl@redhat.com>
Thu, 6 Feb 2020 16:47:57 +0000 (17:47 +0100)
This allows us do do what we want internally, and anyway it didn't
really do what you'd expect anymore now that we do resizing during
rendering.

docs/reference/gtk/gtk4-sections.txt
gtk/gtkicontheme.c
gtk/gtkicontheme.h

index c59c2e6692e2cc4c730220f900eb8486597604a6..fa4001a1f6b4e48e5503766d1c7deeb4119d8c3c 100644 (file)
@@ -5011,7 +5011,6 @@ gtk_icon_theme_list_icons
 gtk_icon_theme_get_icon_sizes
 gtk_icon_paintable_get_filename
 gtk_icon_paintable_is_symbolic
-gtk_icon_paintable_download_texture
 <SUBSECTION Standard>
 GtkIconClass
 GTK_ICON_THEME
index 9b356b4e9bad06e824600c2595cf588b7e77b633..2b94a87339e8069cc05e84202f3be3342489ddf2 100644 (file)
@@ -2072,8 +2072,7 @@ choose_icon (GtkIconTheme      *self,
  *
  * Looks up a named icon for a desired size and window scale, returning a
  * #GtkIcon. The icon can then be rendered by using it as a #GdkPaintable,
- * or you can get information such as the filename and size. The pixels
- * of the texture can be access by using gtk_icon_paintable_download_texture().
+ * or you can get information such as the filename and size.
  *
  * If the available @icon_name is not available and @fallbacks are provided,
  * they will be tried in order.
@@ -3301,16 +3300,8 @@ icon_ensure_texture__locked (GtkIconPaintable *icon,
     }
 }
 
-/**
- * gtk_icon_paintable_download_texture:
- * @self: a #GtkIcon
- *
- * Tries to access the pixels of an icon.
- *
- * Returns: (transfer full): An texture with the contents of the icon.
- */
-GdkTexture *
-gtk_icon_paintable_download_texture (GtkIconPaintable *self)
+static GdkTexture *
+gtk_icon_paintable_ensure_texture (GtkIconPaintable *self)
 {
   GdkTexture *texture = NULL;
 
@@ -3401,7 +3392,7 @@ gtk_icon_paintable_snapshot_with_colors (GtkIconPaintable *icon,
   double render_height;
   gboolean symbolic;
 
-  texture = gtk_icon_paintable_download_texture (icon);
+  texture = gtk_icon_paintable_ensure_texture (icon);
   symbolic = gtk_icon_paintable_is_symbolic (icon);
 
   if (symbolic)
index a780dc14a896625056cdf847753fe284734e9d61..efacc13c500347d582aa6d6754b2ac75baa044bd 100644 (file)
@@ -140,8 +140,6 @@ GDK_AVAILABLE_IN_ALL
 const gchar *         gtk_icon_paintable_get_filename     (GtkIconPaintable  *self);
 GDK_AVAILABLE_IN_ALL
 gboolean              gtk_icon_paintable_is_symbolic      (GtkIconPaintable  *self);
-GDK_AVAILABLE_IN_ALL
-GdkTexture *          gtk_icon_paintable_download_texture (GtkIconPaintable  *self);
 
 G_END_DECLS